let arrs=[
    {"id":"1","name":"小刘","age":"25"},
    {"id":"2","name":"小华","age":"24"},
    {"id":"3","name":"小佳","age":"27"},
    {"id":"4","name":"小王","age":"24"},
    {"id":"5","name":"小何","age":"22"},
]
let guolv = arrs.filter((ele,index)=>{
    return ele['age'] >25
})
console.log(guolv,'过滤年龄大于25的')
let ces =[
    {"id":'1','technology':'JS'},{"id":'2','technology':'Java'},{"id":'3','technology':'Golang'}
]
ces.map(item=>{
    let news = arrs.filter((ele,index)=>{
        if(item.id==ele["id"]){
            return ele
        } 
    })
    item.age =news[0].age
})
console.log(ces,'ces')


Array.prototype.indexOf=function(v){
    for(var i=0;i<this.length;i++){
        if(this[i]==v){
            return i
        } 
    }
    return -1
}
Array.prototype.removeEle=function(v){
    let indexs = this.indexOf(v);
    if(indexs>-1){
        this.splice(indexs,1)
    }
}
let das = [1,2,3,4]
console.log(das.indexOf(6))
das.removeEle(3)
console.log(das)

let ceshi = [1,2,3,4]
let da=[]
for(let i =0;i<ceshi.length;i++){
    let log={}
    log.age='28'
    da.push(Object.assign({},log))
}
console.log(da,'dddddddddddddddddd')
let flag =true
let sa =[]
let log2 ={
    name:'z'
}
let log3={
    name:'rre',
    age:'12'
}
if(flag){
    sa.push(log2)
}
 sa.push(Object.assign({},log2,log3))
console.log(sa,'6666666666666')

let sortA =[
    {'id':1},
    {'id':5},
    {'id':4},
    {'isA':true,'id':1}
]
let sss=sortA.sort(function(a,b){
    if(a.isA&&a.isA==true){
        return -1
    }else{
        return 1
    }
})
console.log(sss,'aaaaaaaaaaaaa')

let cccccc=[]
sortA.map(item=>{
    if(item.id==5){
        cccccc.push({'id':5555})
    }else{
        cccccc.push({'id':item.id})
    }
})

console.log(cccccc)

function es6quchong(params) {
    return Array.from(new Set(params))
}
console.log(es6quchong([10,1,1,2,3,4,6,6,6,7]),'quchong')


let saa = [];
sortA.forEach(ele=>{
    saa.push(ele.id)
})
let erere =  saa.filter(item=>{
    return item>3
})
console.log(...saa,erere)
console.log(Math.max(...saa))

let nulArr = [null,1,2,null]
function delNul(){
    return nulArr.filter(c=>{
        return !(!c || c==='')
    }).join('，').replace(/，/g,'_')
}
console.log(delNul())
